/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tvunetworks.model;

import java.io.Serializable;

/**
 *
 * @author michael
 */
public class Category extends BaseObject implements Serializable {

    private String categoryId;
    private String name;
    private String description;

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Category other = (Category) obj;
        if ((this.categoryId == null || !this.categoryId.equals(other.categoryId))) {
            return false;
        }
        if ((this.name == null || !this.name.equals(other.name))) {
            return false;
        }
        if ((this.description == null || !this.description.equals(other.description))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 47 * hash + (this.categoryId != null ? this.categoryId.hashCode() : 0);
        hash = 47 * hash + (this.name != null ? this.name.hashCode() : 0);
        hash = 47 * hash + (this.description != null ? this.description.hashCode() : 0);
        return hash;
    }

    public String toString() {
        return getCategoryId();
    }
}
